package edu.umn.ftpmaster;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.sql.*;




public class testcl{

	public static void main(String [] args)
	{
		try{
			InetAddress addr = InetAddress.getByName("10.20.65.72");
			int port = 5000;
			
			Socket soc = new Socket(addr,port);
			ObjectOutputStream oos = new ObjectOutputStream(soc.getOutputStream());
                        ObjectInputStream ois = new ObjectInputStream(soc.getInputStream());			
			Command repcc = null;

			
			Location_stp loc = new Location_stp();
			/*loc.latitude = 44.3; 
			loc.longitude = -91.133; 
			loc.time = System.currentTimeMillis();	
			String enam = "jim bday";
			Command cc = new Command("search_adv",loc,enam,null,null,null);
			oos.writeObject(cc);
			repcc = (Command)ois.readObject();
			System.out.println("I got this bak "+ repcc.getMessage());
                      	*/  			

			/*	
			loc.latitude = 44.3;
			loc.longitude = -91.133;
			loc.time = System.currentTimeMillis();
			Command cc = new Command("new",loc,"jim bda",null,"evan","Amundson");
			oos.writeObject(cc);
			repcc = (Command)ois.readObject(); 
			System.out.println("I got this bak "+ repcc.getMessage());
			*/
			
			/*
			String evnam = "jim bday";
			Command cc = new Command("join",null,evnam,null,null,null);	
			oos.writeObject(cc);
			repcc = (Command)ois.readObject();
			System.out.println("I got this bak "+repcc.getMessage());	
			*/
		}
		catch (Exception e) {
			System.out.println(e);
		}


	}

}
